/**
 * @file 14.c
 * @author your name (you@domain.com)
 * @brief 在不适用库函数的情况下反转字符串
 * @version 0.1
 * @date 2022-04-13
 * 
 * @copyright Copyright (c) 2022
 * 
 */
#include <stdio.h>
#include <string.h>

int main()
{
    char str[100], rev[100];
    int i, len = 0;
    printf("请输入字符串：");
    gets(str);
    for (i = 0; i <= 100; i++)
    {
        if (str[i] == '\0')
        {
            break;
        }
        len++;
    }
    for (i = 0; i <= len; i++)
    {
        rev[i] = str[len - i - 1];
    }
    printf("字符串的反向是 %s", rev);
    return 0;
}